package com.sunjob.common.domain.system;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Wangzurong
 * @create 2022-08-02 9:27
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class SysBusinessLogContent<T> implements Serializable {
    // 业务数据
    private T data;
    // 使用的角色标识列表
    private String[] roles;
    // 影响的表名集合
    private String[] tables;
    private BusinessType businessType;
    public SysBusinessLogContent<T> withData(T data){
        this.data = data;
        return this;
    }
    public SysBusinessLogContent<T> withRoles(String[] roles){
        this.roles = roles;
        return this;
    }
    public SysBusinessLogContent<T> withTables(String[] tables){
        this.tables=  tables;
        return this;
    }
    public SysBusinessLogContent<T> withBusinessType(BusinessType businessType){
        this.businessType = businessType;
        return this;
    }
}
